package sweetsaremeat.beehive;

import sweetsaremeat.beehive.Controller.MasterController;
import sweetsaremeat.beehive.View.GameView;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.Toast;

public class BeehiveActivity extends Activity 
{	
	MasterController m_masterController;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        
        //remove the title bar
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        
        
        //Toast.makeText(this, "Mep", Toast.LENGTH_SHORT).show();
        
        //check if we can load the last instance of the master controller
        if (BeehiveApp.m_masterController == null)
	    {
	    	//create the master controller
        	BeehiveApp.m_masterController = new MasterController(this);
	    }
        else
        {
        	//update the activity reference
        	BeehiveApp.m_masterController.CreateView(this);
        }
        
        setContentView(BeehiveApp.m_masterController.m_gameView);
    }
}